package com.sun.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * 自定义视图解析器和视图对象
 * @author sun
 */
@Controller
public class Demo {

    @RequestMapping("/mytView")
    public String testView(Model model){
        List<String> vname=new ArrayList<>();
        List<String> imgs=new ArrayList<>();
        vname.add("佟老师");
        vname.add("飞哥");
        imgs.add("阳哥");
        model.addAttribute("vedio",vname);
        model.addAttribute("imgs",imgs);
        System.out.println("testView...");
        return "sun:/myView";
    }
}
